/**
 * 按钮权限控制组件
 * @date    2020-07-04 11:22:20
 * @Author  likai
 * @email   
 */
import React from 'react'
import {getUserInfo} from '@utils/store'

let {buttonList=[]} = getUserInfo()

export default (props)=>{
	let {permission} = props
	if(!!permission && buttonList.findIndex(it=>it.permission==permission)==-1) return null
	return <>{props.children}</>
}
